package com.ruoyi.papers.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.papers.mapper.JwResearchPapersMapper;
import com.ruoyi.papers.domain.JwResearchPapers;
import com.ruoyi.papers.service.IJwResearchPapersService;

/**
 * 论文发情况Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-13
 */
@Service
public class JwResearchPapersServiceImpl implements IJwResearchPapersService 
{
    @Autowired
    private JwResearchPapersMapper jwResearchPapersMapper;

    /**
     * 查询论文发情况
     * 
     * @param rpId 论文发情况主键
     * @return 论文发情况
     */
    @Override
    public JwResearchPapers selectJwResearchPapersByRpId(Long rpId)
    {
        return jwResearchPapersMapper.selectJwResearchPapersByRpId(rpId);
    }

    /**
     * 查询论文发情况列表
     * 
     * @param jwResearchPapers 论文发情况
     * @return 论文发情况
     */
    @Override
    @DataScope(deptAlias = "d",userAlias = "d")
    public List<JwResearchPapers> selectJwResearchPapersList(JwResearchPapers jwResearchPapers)
    {
        return jwResearchPapersMapper.selectJwResearchPapersList(jwResearchPapers);
    }

    /**
     * 新增论文发情况
     * 
     * @param jwResearchPapers 论文发情况
     * @return 结果
     */
    @Override
    public int insertJwResearchPapers(JwResearchPapers jwResearchPapers)
    {
        return jwResearchPapersMapper.insertJwResearchPapers(jwResearchPapers);
    }

    /**
     * 修改论文发情况
     * 
     * @param jwResearchPapers 论文发情况
     * @return 结果
     */
    @Override
    public int updateJwResearchPapers(JwResearchPapers jwResearchPapers)
    {
        jwResearchPapers.setUpdateTime(DateUtils.getNowDate());
        return jwResearchPapersMapper.updateJwResearchPapers(jwResearchPapers);
    }

    /**
     * 批量删除论文发情况
     * 
     * @param rpIds 需要删除的论文发情况主键
     * @return 结果
     */
    @Override
    public int deleteJwResearchPapersByRpIds(Long[] rpIds)
    {
        return jwResearchPapersMapper.deleteJwResearchPapersByRpIds(rpIds);
    }

    /**
     * 删除论文发情况信息
     * 
     * @param rpId 论文发情况主键
     * @return 结果
     */
    @Override
    public int deleteJwResearchPapersByRpId(Long rpId)
    {
        return jwResearchPapersMapper.deleteJwResearchPapersByRpId(rpId);
    }
}
